/**
 * onlinehomework
 * 所有的教务，页面路由
 */
export default [
  {
    path: "/onlinehomework",
    redirect: "/onlinehomework/testpaper/testPaperList",
    alwaysShow: true, // will always show the root menu
    name: "OnlineHomework",
    meta: {
      title: "在线作业管理",
      icon: "icon-zaixianzuoye",
      roles: ["admin", "editor"], // you can set roles in root nav
    },
    children: [
      {
        path: "/onlinehomework/testpaper",
        redirect: "/onlinehomework/testpaper/testPaperList",
        component: () => import("@/views/OnlineHomework/TestPaper/index.vue"),
        name: "TestPaper",
        meta: {
          title: "试卷管理",
          roles: ["admin"], 
        },
        children: [
          {
            path: "/onlinehomework/testpaper/testPaperList",
            component: () =>
              import("@/views/OnlineHomework/TestPaper/TestPaperList.vue"),
            name: "testPaperList",
            meta: {
              title: "试卷列表",
              roles: ["admin"]
            },
          },
          {
            path: "/onlinehomework/testpaper/createtestpaper",
            component: () =>
              import("@/views/OnlineHomework/TestPaper/CreateTestPaper.vue"),
            name: "createTestPaper",
            meta: {
              title: "创建试卷",
              roles: ["admin"]
            },
            hidden: true,
          },
          {
            path: "/onlinehomework/testpaper/subsectionrules",
            component: () =>
              import("@/views/OnlineHomework/TestPaper/SubsectionRules.vue"),
              name: "SubsectionRules ",
              meta: {
                title: "自动分卷规则",
                roles: ["admin"]
            } 
          },
          {
            path: "/onlinehomework/testpaper/automatic/:row/:isEdit/:currentPage",
            component: () =>
              import("@/views/OnlineHomework/TestPaper/Automatic.vue"),
              name: "automatic",
              meta: {
                title: "自动分卷",
                roles: ["admin"]
              },
              hidden: true,
          },
        ],
      },
      {
        path: "/onlinehomework/questionbank/questionBankList",
        component: () =>
          import("@/views/OnlineHomework/QuestionBank/index.vue"),
        name: "QuestionBankHome",
        meta: {
          title: "题库管理",
          roles: ["admin"], 
        },
        children: [
          {
            path: "/onlinehomework/questionbank/questionBankList",
            component: () =>
              import(
                "@/views/OnlineHomework/QuestionBank/QuestionBankList.vue"
              ),
            name: "QuestionBankList",
            meta: {
              title: "题库列表",
              roles: ["admin"]
            },
          },
          {
            path: "/onlinehomework/testpaper/new/:tabIndex/:row/:isEdit/:currentPage",
            component: () =>
              import("@/views/OnlineHomework/QuestionBank/new.vue"),
            name: "new",
            meta: {
              title: "创建",
              roles: ["admin"]
            },
            hidden: true,
          },
          {
            path: "/onlinehomework/testpaper/singleChoice",
            component: () =>
              import("@/views/OnlineHomework/QuestionBank/SingleChoice.vue"),
            name: "SingleChoice",
            meta: {
              title: "单选",
              roles: ["admin"]
            },
            hidden: true,
          },
          {
            path: "/onlinehomework/testpaper/filling",
            component: () =>
              import("@/views/OnlineHomework/QuestionBank/Filling.vue"),
            name: "Filling",
            meta: {
              title: "填空",
              roles: ["admin"]
            },
            hidden: true,
          },
          {
            path: "/onlinehomework/testpaper/judge",
            component: () =>
              import("@/views/OnlineHomework/QuestionBank/Judge.vue"),
            name: "Judge",
            meta: {
              title: "判断",
              roles: ["admin"]
            },
            hidden: true,
          },
          {
            path: "/onlinehomework/testpaper/multiple",
            component: () =>
              import("@/views/OnlineHomework/QuestionBank/Multiple.vue"),
            name: "Multiple",
            meta: {
              title: "多选",
              roles: ["admin"]
            },
            hidden: true,
          },
        ],
      },
    ],
  },
];
